package com.gtenacg.cartoonservice.service.impl;

import com.gtenacg.cartoonservice.mapper.RelationCartoonTypeMapper;
import com.gtenacg.cartoonservice.pojo.model.RelationCartoonType;
import com.gtenacg.cartoonservice.service.RelationCartoonTypeService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 86198
* @description 针对表【relation_cartoon_type(漫画关系对应表)】的数据库操作Service实现
* @createDate 2024-05-09 11:28:05
*/
@Service
@RequiredArgsConstructor
public class RelationCartoonTypeServiceImpl implements RelationCartoonTypeService {
    private final RelationCartoonTypeMapper relationMapper;
    @Override
    public List<RelationCartoonType> list() {
        return relationMapper.list();
    }

    @Override
    public List<RelationCartoonType> getByCids(List<Integer> cids) {
        return relationMapper.getByCids(cids);
    }

    @Override
    public List<RelationCartoonType> getByTids(List<Integer> tids) {
        return relationMapper.getByTids(tids);
    }

    @Override
    public Integer insert(RelationCartoonType relationCartoonType) {
        relationMapper.insert(relationCartoonType);
        return relationCartoonType.getRctid();
    }

    @Override
    public void update(RelationCartoonType relationCartoonType) {
        relationMapper.update(relationCartoonType);
    }

    @Override
    public void delete(List<Integer> ids) {
        relationMapper.delete(ids);
    }

    @Override
    public List<RelationCartoonType> search(Integer cid, Integer ctid) {
        return relationMapper.search(cid, ctid);
    }
}




